# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=print-manager
pkgver=23.08.4
pkgrel=0
# armhf blocked by qt5-qtdeclarative
arch="all !armhf"
url="https://www.kde.org/applications/utilities/"
pkgdesc="A tool for managing print jobs and printers"
license="GPL-2.0-or-later"
makedepends="
	cups-dev
	extra-cmake-modules
	kcmutils5-dev
	kconfig5-dev
	kconfigwidgets5-dev
	kcoreaddons5-dev
	kdbusaddons5-dev
	ki18n5-dev
	kiconthemes5-dev
	kio5-dev
	knotifications5-dev
	kwidgetsaddons5-dev
	kwindowsystem5-dev
	plasma-framework5-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	samurai
	"
_repo_url="https://invent.kde.org/plasma/print-manager.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/print-manager-$pkgver.tar.xz"
subpackages="$pkgname-lang"
options="!check" # No tests available

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
3c527ea57d78492a77252b9c5d22e476ef05531bb154c3bd7d986dcb0bbd87c0811b8e3e354f5da94ed58bdf4d7a119d648b80b2ad8689cabe332fb9265e78d3  print-manager-23.08.4.tar.xz
"
